package sjtu.ist.warehouse4ws.service;

import java.util.List;

import sjtu.ist.warehouse4ws.dao.ProcessDao;
import sjtu.ist.warehouse4ws.dao.cust.CustProcessDao;
import sjtu.ist.warehouse4ws.model.Process;

public class ProcessServiceImpl implements ProcessService {
	private ProcessDao processDao;	
	private CustProcessDao custProcessDao;	
	
	public void setProcessDao(ProcessDao processDao) {
		this.processDao = processDao;
	}
	public void setCustProcessDao(CustProcessDao custProcessDao) {
		this.custProcessDao = custProcessDao;
	}
	@Override
	public List<Process> getProcessList() {
		// TODO Auto-generated method stub
		return (List<Process>)processDao.findProcess();
	}
	@Override
	public void save(Process process) {
		// TODO Auto-generated method stub
		processDao.sava(process);
	}
	@Override
	public List<Process> getProcessListbyGroupId(String groupId) {
		// TODO Auto-generated method stub
		return processDao.findProcess(groupId);
	}
	@Override
	public List<Process> getProcessListById(String id) {
		// TODO Auto-generated method stub
		return (List<Process>)processDao.findById(id);
	}
	@Override
	public List<Process> getProcessListByGroupAndVersion(String groupId,String versionId) {
		// TODO Auto-generated method stub
		return (List<Process>)processDao.findByGroupAndVersion(groupId,versionId);
	}

}
